package com.fjnu.controller;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.fjnu.controller.common.BaseController;
import com.util.EncoderHandler;
@Controller
public class QRCodeController extends BaseController {
	@RequestMapping(value="/QRCode")
	@ResponseBody
	public Map<String,Object> getQRCode(HttpServletRequest request,HttpServletResponse response,
			String content) throws Exception{
		if(!init(content).get(STATUS).equals(SUCCESS))
			return getData();
		String tmpPath = request.getSession().getServletContext().getRealPath("/UporDown");
		EncoderHandler encoder = new EncoderHandler();
		encoder.encoderQRCoder(content, response,tmpPath);
		//String path="";
		//put("path",path);
		return getData();
	}
}
